package com.ruoyi.material.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.constant.material.PurchaseConstants;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购单对象 tb_purchase_order
 *
 * @author wng
 * @date 2024-08-04
 */
public class PurchaseOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 采购单编号
     */

    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "采购单编号")
    private Long id;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 采购类型
     * Manufacturer 从生产企业采购
     * BusinessUnit 从经营单位采购
     * FoodProducer 食用农产品生产者
     * Butcher 屠宰企业
     * SelfEmployed 个体工商户
     */
//    @Excel(name = "采购类型 " +
//            "Manufacturer 从生产企业采购 " +
//            "BusinessUnit 从经营单位采购 " +
//            "FoodProducer 食用农产品生产者 " +
//            "Butcher 屠宰企业 " +
//            "SelfEmployed 个体工商户")
    private PurchaseConstants.TypeEnum type;

    /**
     * 供应商id
     */
//    @Excel(name = "供应商id")
    private Long supplierId;

    /**
     * 采购单状态
     * ToBeAccepted 待验收
     * Accepted 已验收
     * Refused 被拒绝
     */
//    @Excel(name = "采购单状态 " +
//            "ToBeAccepted 待验收 " +
//            "Accepted 已验收 " +
//            "Refused 被拒绝")
    private PurchaseConstants.StatusEnum status;

    /**
     * 入库状态
     * ToBeIn 待入库
     * Complete 完成入库
     * Part 部分入库
     */
//    @Excel(name = "入库状态 " +
//            "ToBeIn 待入库 " +
//            "Complete 完成入库 " +
//            "Part 部分入库")
    private PurchaseConstants.WarehouseStatusEnum warehouseStatus;

    /**
     * 加盖公章的营业执照图片
     */
    @Excel(name = "加盖公章的营业执照图片", cellType = Excel.ColumnType.IMAGE)
    private String bLicense;

    /**
     * 食品生产许可证复印件图片
     */
    @Excel(name = "食品生产许可证复印件图片", cellType = Excel.ColumnType.IMAGE)
    private String pLicense;

    /**
     * 食品经营许可证复印件图片或备案证明
     */
    @Excel(name = "食品经营许可证复印件图片或备案证明", cellType = Excel.ColumnType.IMAGE)
    private String fBLicense;

    /**
     * 社会信用代码
     */
    @Excel(name = "社会信用代码")
    private String creditCode;

    /**
     * 身份证正反面复印件图片
     */
    @Excel(name = "身份证正反面复印件图片", cellType = Excel.ColumnType.IMAGE)
    private String idCopy;

    /**
     * 产品合格证明文件url
     */
    @Excel(name = "产品合格证明文件url", cellType = Excel.ColumnType.IMAGE)
    private String qualityCert;

    /**
     * 检疫合格证明文件
     */
    @Excel(name = "检疫合格证明文件", cellType = Excel.ColumnType.IMAGE)
    private String jyQualityCert;

    /**
     * 肉品品质检验合格证明文件
     */
    @Excel(name = "肉品品质检验合格证明文件", cellType = Excel.ColumnType.IMAGE)
    private String rpQualityCert;

    /**
     * 猪瘟病毒检测阴性报告文件
     */
    @Excel(name = "猪瘟病毒检测阴性报告文件", cellType = Excel.ColumnType.IMAGE)
    private String vCheckCert;

    /**
     * 报关单文件
     */
    @Excel(name = "报关单文件", cellType = Excel.ColumnType.IMAGE)
    private String billEntry;

    /**
     * 购物凭证文件
     */
    @Excel(name = "购物凭证文件", cellType = Excel.ColumnType.IMAGE)
    private String shoppingCert;

    /**
     * 0正常 1删除
     */
    private Integer delFlag;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public PurchaseConstants.TypeEnum getType() {
        return type;
    }

    public void setType(PurchaseConstants.TypeEnum type) {
        this.type = type;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public PurchaseConstants.StatusEnum getStatus() {
        return status;
    }

    public void setStatus(PurchaseConstants.StatusEnum status) {
        this.status = status;
    }

    public PurchaseConstants.WarehouseStatusEnum getWarehouseStatus() {
        return warehouseStatus;
    }

    public void setWarehouseStatus(PurchaseConstants.WarehouseStatusEnum warehouseStatus) {
        this.warehouseStatus = warehouseStatus;
    }

    public void setbLicense(String bLicense) {
        this.bLicense = bLicense;
    }

    public String getbLicense() {
        return bLicense;
    }

    public void setpLicense(String pLicense) {
        this.pLicense = pLicense;
    }

    public String getpLicense() {
        return pLicense;
    }

    public void setfBLicense(String fBLicense) {
        this.fBLicense = fBLicense;
    }

    public String getfBLicense() {
        return fBLicense;
    }

    public void setCreditCode(String creditCode) {
        this.creditCode = creditCode;
    }

    public String getCreditCode() {
        return creditCode;
    }

    public void setIdCopy(String idCopy) {
        this.idCopy = idCopy;
    }

    public String getIdCopy() {
        return idCopy;
    }

    public void setQualityCert(String qualityCert) {
        this.qualityCert = qualityCert;
    }

    public String getQualityCert() {
        return qualityCert;
    }

    public void setJyQualityCert(String jyQualityCert) {
        this.jyQualityCert = jyQualityCert;
    }

    public String getJyQualityCert() {
        return jyQualityCert;
    }

    public void setRpQualityCert(String rpQualityCert) {
        this.rpQualityCert = rpQualityCert;
    }

    public String getRpQualityCert() {
        return rpQualityCert;
    }

    public void setvCheckCert(String vCheckCert) {
        this.vCheckCert = vCheckCert;
    }

    public String getvCheckCert() {
        return vCheckCert;
    }

    public void setBillEntry(String billEntry) {
        this.billEntry = billEntry;
    }

    public String getBillEntry() {
        return billEntry;
    }

    public void setShoppingCert(String shoppingCert) {
        this.shoppingCert = shoppingCert;
    }

    public String getShoppingCert() {
        return shoppingCert;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("type", getType())
                .append("supplierId", getSupplierId())
                .append("status", getStatus())
                .append("warehouseStatus", getWarehouseStatus())
                .append("bLicense", getbLicense())
                .append("pLicense", getpLicense())
                .append("fBLicense", getfBLicense())
                .append("creditCode", getCreditCode())
                .append("idCopy", getIdCopy())
                .append("qualityCert", getQualityCert())
                .append("jyQualityCert", getJyQualityCert())
                .append("rpQualityCert", getRpQualityCert())
                .append("vCheckCert", getvCheckCert())
                .append("billEntry", getBillEntry())
                .append("shoppingCert", getShoppingCert())
                .append("delFlag", getDelFlag())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .toString();
    }
}
